/***************************************************************************
 创建者：华磊
 开始时间：         : 2017.02.13
 copyright            : (C) 深圳市华友高科有限公司
 修改说明：（每次有修改就添加一条，带有 修改人，修改时间，修改描述）

 ***************************************************************************
 *   码垛指令视窗
*                                                                         *
 ***************************************************************************/
#ifndef PALLETINSTRUCTIONDELEGATE_H
#define PALLETINSTRUCTIONDELEGATE_H

#include "palletinstructiondelegate_global.h"
#include "../PalletInstructionView/palletinstructionview.h"
#include <QObject>
#include <QTranslator>

#include "../../CommunicateDelegate/moveoperation.h"

extern FileData fileData;

class PALLETINSTRUCTIONDELEGATESHARED_EXPORT PalletInstructionDelegate : public QObject
{
    Q_OBJECT

public:
    PalletInstructionDelegate(GlobalData *globalDataIn,MoveOperation *moveOperationIn,
                              QWidget *parent = 0);

    void initialView();

    void changeLanguage(int language);

private:
    QTranslator translator;

public:
    PalletInstructionView *palletInstructionView;



signals:
    void msgBoxSignal(int type,QString title,QString text);

    void saveFileAndUpdateCtrlSignal(QString fileName,QString md5);
    /**
     * @brief moveToPointSignal             移动到点 信号
     * @param movePoint
     */
//    void moveToPointSignal(MoveParameter movePoint);

    /**
     * @brief moveToPointSignal             停止移动到点 信号
     * @param movePoint
     */
//    void stopMoveToPointSignal();

    void setIsSaveSignal(bool state);

public slots:
    void selectJInstructionSlot();
    void selectLInstructionSlot();
    void recordPointSlot(int pointNum);
    void moveToPointSlot(int type ,int pointNum);
    void moveToPointFinishSlot();
    void showPointInfoSlot(int pointNum);

    void isSelectAuxiliarySlot();

    void selectSkipInstructionSlot();
    void clearNoteSlot();

    void finishHeadInstructionSlot();
    void finishMotionInstructionSlot();

private:
    GlobalData *globalData;
    MoveOperation *moveOperation;
};

#endif // PALLETINSTRUCTIONDELEGATE_H
